<template>
    <div class="page">
        <div class="bg">
            <img src="static/img/background@3x.jpg" alt="">
        </div>
        <div class="page-content">
            <div class="logo">
                <img src="static/img/logo@3x.png" alt="">
            </div>
            <!--手机号-->
            <div class="inputLeft">
                <input type="text" placeholder="请输入手机号" ref="mobile" v-model="mobile" v-betterInput="1">
            </div>
            <b-divide></b-divide>
            <!--图形验证码-->
            <template v-if="showAuthImg">
                <b-img-auth v-model="picCode" class="inputLeft" :betterInput="1" :mobile="mobile" :reauth="reauth" ref="picCode"></b-img-auth>
                <b-divide></b-divide>
            </template>
            <!--短信验证码-->
            <b-sms-code class="inputLeft" :betterInput="1" :mobile="mobile" :picCode="picCode" v-model="smsCode" ref="smsCode" @fail="failSms"></b-sms-code>
            <b-divide></b-divide>
            <!--密码-->
            <b-eye-pass-input class="inputLeft" placeholder="请输入6-18位密码 字母与数字组合" ref="password" v-model="password" betterInput="1"></b-eye-pass-input>
            <!--协议-->
            <div class="agreement">
                <input type="checkbox" v-model="agreeProto"> 同意
                <router-link to="/protocol/register">《随行贷注册协议》</router-link>
            </div>
            <!--注册按钮-->
            <md-button class="button button-balanced button-block" @click.native="registerAction()">
                注册
            </md-button>
            <!--登录-->
            <div class="login">
                已有账号
                <router-link to="/user/login">登录</router-link>
            </div>
        </div>
    </div>
</template>
<script src="./Register.js"></script>
<style lang="scss" scoped src="./Register.scss"></style>
